// @ts-ignore
/* eslint-disable */
import { OpenApi as request } from "@/utils/request";

/** 设置积分规则 POST /shop/account/setting/integral */
export async function settingIntegral(
  body: API.ShopSettingIntegralDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-user/shop/account/setting/integral`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 获取分店信息 GET /shop/account/shopInfo */
export async function shopInfo(options?: { [key: string]: any }) {
  return request<API.BaseResponseShopInfoVo>(
    `/barter-user/shop/account/shopInfo`,
    {
      method: "GET",
      ...(options || {}),
    }
  );
}

/** 添加储值 POST /shop/account/wallet/balance */
export async function addWalletBalance(
  body: API.ShopWalletBalanceAddDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-user/shop/account/wallet/balance`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 储值明细分页 GET /shop/account/wallet/history */
export async function listWalletHistoryPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listWalletHistoryPageParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRespShopWalletChangeHistoryVo>(
    `/barter-user/shop/account/wallet/history`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
